home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Hyper
/
T
/
TalkTools Script.cpt
/
TalkTools Script
next >
Wrap
Text File
|
1990-12-13
|
3KB
|
98 lines
on idle -- Example script to speak the time -- uses TALK command from TalkTools
if the time <> card field "Time" then
put the time into card field "Time"
put the time into it
-- say hour
if char 3 of it is ":" then -- hour is 10, 11 or 12
if char 2 of it is "0" then -- hour is 10
put "ten" into talkTime
else if char 2 of it is "1" then -- hour is 11
put "eleven" into talkTime
else -- hour is twelve
put "twelve" into talkTime
end if
put 4 into minpos
else -- hour is 1-9
put char 1 of it into talkTime
put 3 into minpos
end if -- saying the hour
put char minpos of the time into it
put char minpos+1 of the time after last char of it
put char minpos+3 of the time after last char of it
put " " after last char of talkTime
-- if mins 0-9
if char 1 of it is "0" then
put "oh " after last char of talkTime
put char 2 of it after last char of talkTime
-- if mins 10-19
else if char 1 of it is "1" then
if char 2 of it is "0" then
put "ten" after last char of talkTime
else if char 2 of it is "1" then
put "eleven" after last char of talkTime
else if char 2 of it is "2" then
put "twelv" after last char of talkTime
else if char 2 of it is "3" then
put "thirteen" after last char of talkTime
else if char 2 of it is "4" then
put "4teen" after last char of talkTime
else if char 2 of it is "5" then
put "fifteen" after last char of talkTime
else if char 2 of it is "6" then
put "6teen" after last char of talkTime
else if char 2 of it is "7" then
put "7teen" after last char of talkTime
else if char 2 of it is "8" then
put "ayteen" after last char of talkTime
else
put "9teen" after last char of talkTime
end if
else if char 1 of it is "2" then
put "twenty " after last char of talkTime
put nz(char 2 of it) after last char of talkTime
else if char 1 of it is "3" then
put "thirty " after last char of talkTime
put nz(char 2 of it) after last char of talkTime
else if char 1 of it is "4" then
put "forty " after last char of talkTime
put nz(char 2 of it) after last char of talkTime
else
put "fifty " after last char of talkTime
put nz(char 2 of it) after last char of talkTime
end if
put " " after last char of talkTime
if char 3 of it is "p" then
put "pee" after last char of talkTime
else
put "ay" after last char of talkTime
end if
put " m" after last char of talkTime
talk talkTime,150,70
end if -- time changed
pass idle
end idle
function nz digit
if digit is "0" then
return " "
else
return digit
end if
end nz
Download complete.